home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / zgtsvx.z / zgtsvx
Encoding:
Text File  |  2002-10-03  |  10.3 KB  |  265 lines

  1.  
  2.  
  3.  
  4. ZZZZGGGGTTTTSSSSVVVVXXXX((((3333SSSS))))                                                          ZZZZGGGGTTTTSSSSVVVVXXXX((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ZGTSVX - use the LU factorization to compute the solution to a complex
  10.      system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      SUBROUTINE ZGTSVX( FACT, TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF, DU2,
  14.                         IPIV, B, LDB, X, LDX, RCOND, FERR, BERR, WORK, RWORK,
  15.                         INFO )
  16.  
  17.          CHARACTER      FACT, TRANS
  18.  
  19.          INTEGER        INFO, LDB, LDX, N, NRHS
  20.  
  21.          DOUBLE         PRECISION RCOND
  22.  
  23.          INTEGER        IPIV( * )
  24.  
  25.          DOUBLE         PRECISION BERR( * ), FERR( * ), RWORK( * )
  26.  
  27.          COMPLEX*16     B( LDB, * ), D( * ), DF( * ), DL( * ), DLF( * ), DU( *
  28.                         ), DU2( * ), DUF( * ), WORK( * ), X( LDX, * )
  29.  
  30. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  31.      These routines are part of the SCSL Scientific Library and can be loaded
  32.      using either the -lscs or the -lscs_mp option.  The -lscs_mp option
  33.      directs the linker to use the multi-processor version of the library.
  34.  
  35.      When linking to SCSL with -lscs or -lscs_mp, the default integer size is
  36.      4 bytes (32 bits). Another version of SCSL is available in which integers
  37.      are 8 bytes (64 bits).  This version allows the user access to larger
  38.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  39.      by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
  40.      only one of the two versions; 4-byte integer and 8-byte integer library
  41.      calls cannot be mixed.
  42.  
  43. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  44.      ZGTSVX uses the LU factorization to compute the solution to a complex
  45.      system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
  46.      where A is a tridiagonal matrix of order N and X and B are N-by-NRHS
  47.      matrices.
  48.  
  49.      Error bounds on the solution and a condition estimate are also provided.
  50.  
  51.  
  52. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  53.      The following steps are performed:
  54.  
  55.      1. If FACT = 'N', the LU decomposition is used to factor the matrix A
  56.         as A = L * U, where L is a product of permutation and unit lower
  57.         bidiagonal matrices and U is upper triangular with nonzeros in
  58.         only the main diagonal and first two superdiagonals.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ZZZZGGGGTTTTSSSSVVVVXXXX((((3333SSSS))))                                                          ZZZZGGGGTTTTSSSSVVVVXXXX((((3333SSSS))))
  71.  
  72.  
  73.  
  74.      2. If some U(i,i)=0, so that U is exactly singular, then the routine
  75.         returns with INFO = i. Otherwise, the factored form of A is used
  76.         to estimate the condition number of the matrix A.  If the
  77.         reciprocal of the condition number is less than machine precision,
  78.         INFO = N+1 is returned as a warning, but the routine still goes on
  79.         to solve for X and compute error bounds as described below.
  80.  
  81.      3. The system of equations is solved for X using the factored form
  82.         of A.
  83.  
  84.      4. Iterative refinement is applied to improve the computed solution
  85.         matrix and calculate error bounds and backward error estimates
  86.         for it.
  87.  
  88.  
  89. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  90.      FACT    (input) CHARACTER*1
  91.              Specifies whether or not the factored form of A has been supplied
  92.              on entry.  = 'F':  DLF, DF, DUF, DU2, and IPIV contain the
  93.              factored form of A; DL, D, DU, DLF, DF, DUF, DU2 and IPIV will
  94.              not be modified.  = 'N':  The matrix will be copied to DLF, DF,
  95.              and DUF and factored.
  96.  
  97.      TRANS   (input) CHARACTER*1
  98.              Specifies the form of the system of equations:
  99.              = 'N':  A * X = B     (No transpose)
  100.              = 'T':  A**T * X = B  (Transpose)
  101.              = 'C':  A**H * X = B  (Conjugate transpose)
  102.  
  103.      N       (input) INTEGER
  104.              The order of the matrix A.  N >= 0.
  105.  
  106.      NRHS    (input) INTEGER
  107.              The number of right hand sides, i.e., the number of columns of
  108.              the matrix B.  NRHS >= 0.
  109.  
  110.      DL      (input) COMPLEX*16 array, dimension (N-1)
  111.              The (n-1) subdiagonal elements of A.
  112.  
  113.      D       (input) COMPLEX*16 array, dimension (N)
  114.              The n diagonal elements of A.
  115.  
  116.      DU      (input) COMPLEX*16 array, dimension (N-1)
  117.              The (n-1) superdiagonal elements of A.
  118.  
  119.      DLF     (input or output) COMPLEX*16 array, dimension (N-1)
  120.              If FACT = 'F', then DLF is an input argument and on entry
  121.              contains the (n-1) multipliers that define the matrix L from the
  122.              LU factorization of A as computed by ZGTTRF.
  123.  
  124.              If FACT = 'N', then DLF is an output argument and on exit
  125.              contains the (n-1) multipliers that define the matrix L from the
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ZZZZGGGGTTTTSSSSVVVVXXXX((((3333SSSS))))                                                          ZZZZGGGGTTTTSSSSVVVVXXXX((((3333SSSS))))
  137.  
  138.  
  139.  
  140.              LU factorization of A.
  141.  
  142.      DF      (input or output) COMPLEX*16 array, dimension (N)
  143.              If FACT = 'F', then DF is an input argument and on entry contains
  144.              the n diagonal elements of the upper triangular matrix U from the
  145.              LU factorization of A.
  146.  
  147.              If FACT = 'N', then DF is an output argument and on exit contains
  148.              the n diagonal elements of the upper triangular matrix U from the
  149.              LU factorization of A.
  150.  
  151.      DUF     (input or output) COMPLEX*16 array, dimension (N-1)
  152.              If FACT = 'F', then DUF is an input argument and on entry
  153.              contains the (n-1) elements of the first superdiagonal of U.
  154.  
  155.              If FACT = 'N', then DUF is an output argument and on exit
  156.              contains the (n-1) elements of the first superdiagonal of U.
  157.  
  158.      DU2     (input or output) COMPLEX*16 array, dimension (N-2)
  159.              If FACT = 'F', then DU2 is an input argument and on entry
  160.              contains the (n-2) elements of the second superdiagonal of U.
  161.  
  162.              If FACT = 'N', then DU2 is an output argument and on exit
  163.              contains the (n-2) elements of the second superdiagonal of U.
  164.  
  165.      IPIV    (input or output) INTEGER array, dimension (N)
  166.              If FACT = 'F', then IPIV is an input argument and on entry
  167.              contains the pivot indices from the LU factorization of A as
  168.              computed by ZGTTRF.
  169.  
  170.              If FACT = 'N', then IPIV is an output argument and on exit
  171.              contains the pivot indices from the LU factorization of A; row i
  172.              of the matrix was interchanged with row IPIV(i).  IPIV(i) will
  173.              always be either i or i+1; IPIV(i) = i indicates a row
  174.              interchange was not required.
  175.  
  176.      B       (input) COMPLEX*16 array, dimension (LDB,NRHS)
  177.              The N-by-NRHS right hand side matrix B.
  178.  
  179.      LDB     (input) INTEGER
  180.              The leading dimension of the array B.  LDB >= max(1,N).
  181.  
  182.      X       (output) COMPLEX*16 array, dimension (LDX,NRHS)
  183.              If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
  184.  
  185.      LDX     (input) INTEGER
  186.              The leading dimension of the array X.  LDX >= max(1,N).
  187.  
  188.      RCOND   (output) DOUBLE PRECISION
  189.              The estimate of the reciprocal condition number of the matrix A.
  190.              If RCOND is less than the machine precision (in particular, if
  191.              RCOND = 0), the matrix is singular to working precision.  This
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ZZZZGGGGTTTTSSSSVVVVXXXX((((3333SSSS))))                                                          ZZZZGGGGTTTTSSSSVVVVXXXX((((3333SSSS))))
  203.  
  204.  
  205.  
  206.              condition is indicated by a return code of INFO > 0.
  207.  
  208.      FERR    (output) DOUBLE PRECISION array, dimension (NRHS)
  209.              The estimated forward error bound for each solution vector X(j)
  210.              (the j-th column of the solution matrix X).  If XTRUE is the true
  211.              solution corresponding to X(j), FERR(j) is an estimated upper
  212.              bound for the magnitude of the largest element in (X(j) - XTRUE)
  213.              divided by the magnitude of the largest element in X(j).  The
  214.              estimate is as reliable as the estimate for RCOND, and is almost
  215.              always a slight overestimate of the true error.
  216.  
  217.      BERR    (output) DOUBLE PRECISION array, dimension (NRHS)
  218.              The componentwise relative backward error of each solution vector
  219.              X(j) (i.e., the smallest relative change in any element of A or B
  220.              that makes X(j) an exact solution).
  221.  
  222.      WORK    (workspace) COMPLEX*16 array, dimension (2*N)
  223.  
  224.      RWORK   (workspace) DOUBLE PRECISION array, dimension (N)
  225.  
  226.      INFO    (output) INTEGER
  227.              = 0:  successful exit
  228.              < 0:  if INFO = -i, the i-th argument had an illegal value
  229.              > 0:  if INFO = i, and i is
  230.              <= N:  U(i,i) is exactly zero.  The factorization has not been
  231.              completed unless i = N, but the factor U is exactly singular, so
  232.              the solution and error bounds could not be computed.  RCOND = 0
  233.              is returned.  = N+1: U is nonsingular, but RCOND is less than
  234.              machine precision, meaning that the matrix is singular to working
  235.              precision.  Nevertheless, the solution and error bounds are
  236.              computed because there are a number of situations where the
  237.              computed solution can be more accurate than the value of RCOND
  238.              would suggest.
  239.  
  240. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  241.      INTRO_LAPACK(3S), INTRO_SCSL(3S)
  242.  
  243.      This man page is available only online.
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.